module Aio::Base::Toolkit::Date
	class << self

		def month_to_i(str)
			return 	case str
							when /(?i)Jan/
								"01"
							when /(?i)Feb/
								"02"
							when /(?i)Mar/
								"03"
							when /(?i)Apr/
								"04"
							when /(?i)May/
								"05"
							when /(?i)Jun/
								"06"
							when /(?i)Jul/
								"07"
							when /(?i)Aug/
								"08"
							when /(?i)Sep/
								"09"
							when /(?i)Oct/
								"10"
							when /(?i)Nov/
								"11"
							when /(?i)Dec/
								"12"
							else
								"unknow"
							end
		end

		# arr = [time, zone, week, year, month, day]
		def time_to_s(arr)
			year 	= arr[3]
			month = arr[4]
			day 	= arr[5]
			time 	= arr[0]
			format("%s-%s-%s %s", year, month, day, time)
		end
			
	end # class self
end

